//
//  SMCategoryBarView.h
//  SteelRecover
//
//  Created by 郑渊文 on 2025/9/16.
//

#import <UIKit/UIKit.h>

#import <UIKit/UIKit.h>

@interface SMCategoryBarView : UIView
@property(nonatomic, copy) NSArray<NSString *> *titles;
@property(nonatomic, assign, readonly) NSInteger selectedIndex;
@property(nonatomic, copy) void(^onSelect)(NSInteger index);

// 选择某个下标
- (void)setSelectedIndex:(NSInteger)index animated:(BOOL)animated;

// 由外部同步滚动进度（0~1），让下划线跟随
- (void)updateIndicatorFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex progress:(CGFloat)progress;
@end

